//
// Created by Jeffrey Wei on 2022/11/3.
// Copyright (c) 2022 CocoaPods. All rights reserved.
//

import Foundation
import Moya

class ErrorHanderPlugin: PluginType {
    static let shared = ErrorHanderPlugin()

    func process(_ result: Result<Response, MoyaError>, target _: TargetType) -> Result<Response, MoyaError> {
        switch result {
        case .success:
            print("")

        case let .failure(error):
            print("")
        }
        return result
    }

    func didReceive(_: Result<Response, MoyaError>, target _: TargetType) {
        print("")
    }
}
